//
//  HMSportMainViewController.m
//  LetsGo
//
//  Created by 段立峰 on 2016/11/9.
//  Copyright © 2016年 段立峰. All rights reserved.
//

#import "HMSportMainViewController.h"
#import "HMSportTracking.h"
#import "HMSportSportingViewController.h"
@interface HMSportMainViewController ()

@end

@implementation HMSportMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)startSport:(UIButton *)sender {
    
    
    //1.根据按钮tag区分运动类型
    HMSportType type = sender.tag;
    
    //2.实例化监控控制器
    HMSportSportingViewController *vc = [HMSportSportingViewController new];
    //3.设置运动类型
    vc.sportType = type;
    //4.展现控制器
    [self presentViewController:vc animated:YES completion:nil];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
